package com.dfbz.dao;

import com.dfbz.entity.Article;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@Repository
public interface ArticleDao extends Mapper<Article> {

    /**
     * 发布文章 条件列表
     * @param map
     * @return
     */
    @SelectProvider(value = ArticleSqlProvider.class,method = "articleConditionPage")
    List<Article> articleConditionPage(Map<String, String> map);

    /**
     * 我的收藏 条件列表
     * @param map 含条件value
     * @return
     */
    @SelectProvider(value =ArticleSqlProvider.class,method = "titleByNameLimit")
    List<Article> titleByNameLimit(Map<String,Object> map);
}
